/*
 * @Author: fisher
 * @Date: 2024-01-03 10:19:21
 * @LastEditTime: 2024-01-05 14:45:56
 * @LastEditors: fisher
 * @Description:
 * @FilePath: \front-end-template\src\modules\DataManage\tasks\api.js
 */
import request from '@/utils/request' // 任务列表
/**
 * @description: 获取task列表
 * @param {*} params
 * @param {*} data
 * @return {*}
 */
export function getTask(params, data) {
  return request({
    url: '/converter/fmeJob/queryPageList',
    method: 'post',
    params,
    data
  })
}

/**
 * @description: 删除task batch
 * @return {*}
 */
export function deleteTask(data) {
  return request({
    url: '/converter/fmeJob/deleteBatch',
    method: 'post',
    data
  })
}

/**
 * @description: 下载fme结果
 * @param {*} token
 * @return {*}
 */

export const downloadRes = (token) => {
  return request({
    url: `/converter/common/filerecord/down?FileToken=${token}`,
    method: 'get',
    responseType: 'blob'
  })
}

export const getLogs = (jobID, data) => {
  return request({
    url: `/converter/fmeJob/getJobLog?jobID=${jobID}`,
    method: 'get',
    data
  })
}
